home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Periodicals / develop / develop 3 code / Surf's Up! / Interfaces / PInterfaces / CTBUtils.p < prev    next >
Encoding:
Text File  |  1989-11-17  |  3.3 KB  |  155 lines  |  [TEXT/MPS ]

  1. {
  2.     CTBUtils.p
  3.     Pascal Interface to the Communications Toolbox Utilities
  4.     
  5.     Copyright © Apple Computer, Inc. 1988,1989
  6.     All rights reserved
  7. }
  8. {$IFC UNDEFINED UsingIncludes}
  9. {$SETC UsingIncludes := 0}
  10. {$ENDC}
  11.  
  12. {$IFC NOT UsingIncludes}
  13.     UNIT CTBUtils;
  14.     INTERFACE
  15. {$ENDC}
  16.  
  17. {$IFC UNDEFINED UsingCTBUtils}
  18. {$SETC UsingCTBUtils := 1}
  19.  
  20. {$I+}
  21. {$SETC CTBUtilsIncludes := UsingIncludes}
  22. {$SETC UsingIncludes := 1}
  23. {$IFC UNDEFINED UsingMemory}
  24. {$I $$Shell(PInterfaces)Memory.p}
  25. {$ENDC}
  26. {$IFC UNDEFINED UsingPackages}
  27. {$I $$Shell(PInterfaces)Packages.p}
  28. {$ENDC}
  29. {$IFC UNDEFINED UsingAppleTalk}
  30. {$I $$Shell(PInterfaces)AppleTalk.p}
  31. {$ENDC}
  32. {$SETC UsingIncludes := CTBUtilsIncludes}
  33.  
  34. CONST
  35. { version of the Comm Toolbox Utilities }
  36.     curCTBUVersion        = 1;
  37.     
  38. { CTBUErr}
  39.     ctbuGenericError    = -1;
  40.     ctbuNoErr            = 0;
  41.  
  42. { DITLMethod }
  43.     overlayDITL         = 0;
  44.     appendDITLRight     = 1;
  45.     appendDITLBottom     = 2;
  46.  
  47. { Choose responses }
  48.     chooseDisaster        = -2;
  49.     chooseFailed        = -1;
  50.     chooseAborted        =  0;
  51.     chooseOKMinor        =  1;
  52.     chooseOKMajor        =  2;
  53.     chooseCancel        =  3;
  54.  
  55. { NuLookup responses }
  56.     nlOk                =    0;
  57.     nlCancel            =    1;
  58.     nlEject                =    2;
  59.     
  60. { Name FilterProc responses }
  61.     nameInclude            =    1;
  62.     nameDisable            =    2;
  63.     nameReject            =    3;
  64.     
  65. { Zone FilterProc responses }
  66.     zoneInclude            =    1;
  67.     zoneDisable            =    2;
  68.     zoneReject            =    3;
  69.     
  70. { Dialog items for hook procedure }
  71.     hookOK                =    1;
  72.     hookCancel             =    2;
  73.     hookOutline            =    3;
  74.     hookTitle            =    4;
  75.     hookItemList        =    5;
  76.     hookZoneTitle        =    6;
  77.     hookZoneList        =    7;
  78.     hookLine            =    8;
  79.     hookVersion            =    9;
  80.     hookReserved1        =    10;
  81.     hookReserved2         =    11;
  82.     hookReserved3        =    12;
  83.     hookReserved4        =    13;
  84. { Virtual items in the dialog item list }
  85.     hookNull            =    100;
  86.     hookItemRefresh        =    101;
  87.     hookZoneRefresh        =    102;
  88.     hookEject            =    103;
  89.     hookPreflight        =    104;
  90.     hookPostflight        =    105;
  91.     hookKeyBase            =    1000;
  92.     
  93. {    Popup Control Constants }
  94.     popupMenuCDEFproc    =    1008;
  95.  
  96. {    Popup Variation Codes }
  97.     popupFixedWidth        =    $0001;
  98.     popupUseCQD            =    $0002;
  99.     popupUseAddResMenu    =    $0004;
  100.     popupUseWFont        =    $0008;
  101.  
  102. {    Popup Title characteristics }
  103.     popupTitleBold        =    $00000100;
  104.     popupTitleItalic    =    $00000200;
  105.     popupTitleUnderline    =    $00000400;
  106.     popupTitleOutline    =    $00000800;
  107.     popupTitleShadow    =    $00001000;
  108.     popupTitleCondense    =    $00002000;
  109.     popupTitleExtend    =    $00004000;
  110.      popupTitleNoStyle    =    $00008000;
  111.  
  112.     popupTitleLeftJust    =    $00000000;
  113.     popupTitleCenterJust=    $00000001;
  114.     popupTitleRightJust    =    $000000FF;
  115.  
  116. TYPE
  117.     CTBUErr     = OSErr;
  118.     DITLMethod     = INTEGER;
  119.     
  120.     NLTypeEntry = RECORD
  121.         hIcon        : Handle;
  122.         typeStr     : Str32;
  123.     END;
  124.     
  125.     NLType         = Array[0..3] of NLTypeEntry;
  126.     
  127.     LookupReply = RECORD
  128.         theEntity    :    EntityName;
  129.         theAddr        :    AddrBlock;
  130.     END;
  131.     
  132.  
  133. FUNCTION    InitCTBUtilities: CTBUErr;
  134. FUNCTION    CTBGetCTBVersion : INTEGER;
  135.  
  136. PROCEDURE     AppendDITL(theDialog: DialogPtr; theDITL: Handle; method: DITLMethod);
  137. FUNCTION     CountDITL(theDialog: DialogPtr) : INTEGER;
  138. PROCEDURE     ShortenDITL(theDialog: DialogPtr; numberItems: INTEGER);
  139.  
  140. FUNCTION    NuLookup(where: Point; prompt: Str255; numTypes: INTEGER;
  141.                      typeList: NLType; nameFilter: ProcPtr; zoneFilter: ProcPtr;
  142.                      hookProc: ProcPtr; VAR theReply: LookupReply) : INTEGER;
  143.  
  144. FUNCTION    NuPLookup(where: Point; prompt: Str255; numTypes: INTEGER;
  145.                    typeList: NLType; nameFilter: ProcPtr; zoneFilter: ProcPtr;
  146.                    hookProc: ProcPtr; userData: LONGINT; dialogID: INTEGER; 
  147.                    filterProc: ProcPtr; VAR theReply: LookupReply) : INTEGER;
  148.  
  149. {$ENDC}    { UsingCTBUtils }
  150.  
  151. {$IFC NOT UsingIncludes}
  152.     END.
  153. {$ENDC}
  154.  
  155.